<template>
    <div id="app">
        <h1>我是Child组件</h1>
    </div>
</template>

<script>
import { ref } from "vue";
export default {
    name: "Child",
    setup() {
        let sum = ref(0);
        return new Promise((reslove, reject) => {
            setTimeout(() => {
                reslove({ sum });
            }, 2000);
        });
        // return {sum}
    },
};
</script>

<style scoped>
#app {
    background-color: pink;
    padding: 10px;
}
</style>